package com.uchengwang.functions.http.entity;

import com.uchengwang.functions.http.listener.IBaseRequest;
import com.uchengwang.ui.cm_ui.ucity.cityBean.BaseBean;

import java.util.HashMap;
import java.util.List;

/**
 * Created by U城网 on 2017/3/2.
 */

public class MapRequest implements IBaseRequest {

    private HashMap<String, Object> data = new HashMap<>();


    public void put(String key, int value) {
        data.put(key, String.valueOf(value));
    }
    public void put(String key, boolean value) {
        data.put(key, String.valueOf(value));
    }

    public void put(String key, long value) {
        data.put(key, String.valueOf(value));
    }

    public void put(String key, String value) {
        data.put(key, value);
    }

    public void put(String key, double value) {
        data.put(key, String.valueOf(value));
    }

    public void put(String key, float value) {
        data.put(key, String.valueOf(value));
    }

    public void put(String key, Long[] l){
        data.put(key, l);
    }
    public void put(String key, String[] v){
        data.put(key, v);
    }

    public void put(String key, BaseBean bean){
        data.put(key, bean);
    }

    public <T>void put(String key, List<T> list){
        data.put(key, list);
    }


    public String getString(String key){
        return (String) data.get(key);
    }

    @Override
    public HashMap<String, Object> getData() {
        return data;
    }
}
